package cn.java.basic;

public class StringOperator
{
    public static void main(String[] args)
    {
        String strHeight=String.valueOf(8848);
        System.out.println(strHeight);

        Integer nAge=18;
        String strAge=nAge.toString();
        System.out.println(strAge);

        String strMovie="郎心";
        String strFullName=strMovie.concat("如铁");
        System.out.println(strFullName);

        String strShort="CAAC".replaceAll("A","B");
        System.out.println(strShort);

        String strHelp="SOS".toLowerCase();
        System.out.println(strHelp);
        strHelp="sos".toUpperCase();
        System.out.println(strHelp);

        String strMsg=" A better tomorrow ";
        strMsg=strMsg.trim();
        System.out.println(strMsg);

        String strStory="我本无情";
        System.out.println(strStory.substring(0,2));
        System.out.println(strStory.substring(2,4));

        String strSong="我"+"爱"+"肖邦";
        System.out.println(strSong);

        if(!strShort.isEmpty())
            System.out.println(strSong);

        String strSong1=new String("请到天涯海角来"),strSong2=new String("请到天涯海角来");

        System.out.println("==比较结果"+(strSong1==strSong2));

        System.out.println("equals比较结果"+(strSong1.equals(strSong2)));

        strSong="请到天涯海角来";
        char []cSong=strSong.toCharArray();
        System.out.println(cSong);

        char []cSong1={'纵','横','四','海'};
        strMovie=String.valueOf(cSong1);
        System.out.println(strMovie);

    }
}
